import Vue from 'vue'

import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

// // 解决element-ui打包后部分浏览器刷新图标乱码问题
// // https://github.com/ElemeFE/element/issues/19247
// import 'element-ui/lib/theme-chalk/icon.css'
// import './styles/element-variables.scss'

import '@/styles/index.scss' // global css

import App from './App'
import store from './store'
import router from './router'

import '@/icons' // icon
import '@/permission' // permission control

// 按需引入vue-awesome图标
import Icon from 'vue-awesome/components/Icon'
import 'vue-awesome/icons/chart-bar.js'
import 'vue-awesome/icons/chart-area.js'
import 'vue-awesome/icons/chart-pie.js'
import 'vue-awesome/icons/chart-line.js'
import 'vue-awesome/icons/align-left.js'
// 全局注册图标
Vue.component('icon', Icon)
// 引入echart
import echarts from 'echarts'
Vue.prototype.$echarts = echarts

// 粒子背景组件
import VueParticles from 'vue-particles'
Vue.use(VueParticles)

import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'
Vue.use(Viewer)
Viewer.setDefaults({
  Options: { zIndex: 9999 }
})

Vue.use(ElementUI)

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
